using IcsSEMCtrl.Util;
using System;
namespace IcsSEMCtrl.Global.Device
{
	public class LifterCarrierState
	{
		public const int _NONE = 0;
		public const int _WAITIN = 1;
		public const int _ONVEHICLE = 2;
		public const int _WAITOUT = 3;
		private int _value;
		private static int _size;
		private static LifterCarrierState[] _array;
		public static string[] displayStrings;
		public static LifterCarrierState[] displayValues;
		public static LifterCarrierState NONE;
		public static LifterCarrierState WAITIN;
		public static LifterCarrierState ONVEHICLE;
		public static LifterCarrierState WAITOUT;
		public static LifterCarrierState IT_ENUM_MAX;
		static LifterCarrierState()
		{
			LifterCarrierState._size = 4;
			LifterCarrierState._array = new LifterCarrierState[LifterCarrierState._size];
			LifterCarrierState.displayStrings = new string[LifterCarrierState._size];
			LifterCarrierState.displayValues = new LifterCarrierState[LifterCarrierState._size];
			LifterCarrierState.NONE = new LifterCarrierState(0);
			LifterCarrierState.WAITIN = new LifterCarrierState(1);
			LifterCarrierState.ONVEHICLE = new LifterCarrierState(2);
			LifterCarrierState.WAITOUT = new LifterCarrierState(3);
			LifterCarrierState.IT_ENUM_MAX = new LifterCarrierState(2147483647);
			LifterCarrierState.displayStrings[0] = "NONE";
			LifterCarrierState.displayStrings[1] = "WAITIN";
			LifterCarrierState.displayStrings[2] = "ONVEHICLE";
			LifterCarrierState.displayStrings[3] = "WAITOUT";
			LifterCarrierState.displayValues[0] = LifterCarrierState.NONE;
			LifterCarrierState.displayValues[1] = LifterCarrierState.WAITIN;
			LifterCarrierState.displayValues[2] = LifterCarrierState.ONVEHICLE;
			LifterCarrierState.displayValues[3] = LifterCarrierState.WAITOUT;
		}
		public static string ValueToString(LifterCarrierState val)
		{
			string result;
			switch (val.Value())
			{
			case 0:
				result = LifterCarrierState.displayStrings[0];
				break;
			case 1:
				result = LifterCarrierState.displayStrings[1];
				break;
			case 2:
				result = LifterCarrierState.displayStrings[2];
				break;
			case 3:
				result = LifterCarrierState.displayStrings[3];
				break;
			default:
				result = "";
				break;
			}
			return result;
		}
		public static LifterCarrierState StringToValue(string val)
		{
			LifterCarrierState result;
			if (Helper.IsNullOrEmpty(val))
			{
				result = LifterCarrierState.IT_ENUM_MAX;
			}
			else
			{
				for (int i = 0; i < LifterCarrierState.displayStrings.Length; i++)
				{
					if (val.Equals(LifterCarrierState.displayStrings[i]))
					{
						result = LifterCarrierState.displayValues[i];
						return result;
					}
				}
				result = null;
			}
			return result;
		}
		public int Value()
		{
			return this._value;
		}
		public static LifterCarrierState From_Int(int value)
		{
			LifterCarrierState result;
			if (value >= 1 && value < LifterCarrierState._size)
			{
				result = LifterCarrierState._array[value];
			}
			else
			{
				result = LifterCarrierState.IT_ENUM_MAX;
			}
			return result;
		}
		protected LifterCarrierState(int value)
		{
			this._value = value;
			if (value >= 1 && value < LifterCarrierState._size)
			{
				LifterCarrierState._array[this._value] = this;
			}
		}
		public bool Equals(LifterCarrierState otherEnum)
		{
			return otherEnum.Value() == this._value;
		}
		public override string ToString()
		{
			return LifterCarrierState.displayStrings[this._value];
		}
	}
}
